package com.sip.comadapter.common;

import java.io.IOException;
import java.util.Map.Entry;
import java.util.Properties;
import java.util.Set;

import javax.annotation.Resource;

import org.springframework.core.io.ClassPathResource;
//import org.springframework.core.io.Resource;
import org.springframework.core.io.support.PropertiesLoaderUtils;

public class ConfigurationPropertiesManager {

	@Resource(name="adaptorproperties")
	private Properties adaptorProperties;
	
	public void load() throws IOException {
		
/*		Resource resource = new ClassPathResource("config/adaptor.properties");
		Properties props = PropertiesLoaderUtils.loadProperties(resource);
		
		for (Entry<Object, Object> e : props.entrySet()) {
			System.out.println(e.getKey() + " value "+e.getValue());
		}*/

		final Set<Object> adapProp = adaptorProperties.keySet();
		System.out.println("Adaptor Property 'Path' "+ adapProp.toString());
	}
}
